package com.example.cinemaorder.mapper;

import com.example.cinemaorder.entity.vo.SearchMovieVo;
import com.example.cinemaorder.entity.vo.UpdateMovieSaleVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;

/**
 * @author 高垚淼
 * @version 1.0
 */
@Mapper
public interface SysSessionMapper {

    SearchMovieVo findSessionById(Long id);

    String findPosterByid(Long id);

    ArrayList findMovieCategoryById(Long id);

    String findNameById(Long id);

    SearchMovieVo getNewSeats(Long id);

    void updateSeats(@Param("id") Long id,@Param("updateSallNums") int updateSallNums,@Param("seats") String seats);

    void updateSallNums(@Param("id")Long id, @Param("num") int num);

    void updateSession(SearchMovieVo curSession);

    void updateCancelState(Long id);

    Long updateMovieSale(UpdateMovieSaleVo updateMovieSaleVo);

    Long getMovieId(Long id);

    void updateMovieRating(@Param("id") int id,@Param("userId") Double userId,@Param("rating") Double rating);
}
